﻿"use strict";
define(['admin/app', "service/admin/wxVerificationCodeService"], function (app) {
    app.controller('wxVerificationCodeController', function ($scope, $stateParams, $location, $uibModal, $state, utils, wxVerificationCodeService) {
        $scope.query = {
            page: 1, size: 20, q: '', title: ''
        };
        $.extend($scope.query, $stateParams);
        var methods = {
            search: function () {
                wxVerificationCodeService.gets($scope.query).success(function (response) {
                    $scope.model = response.data;
                });
            },
            goBack: function () {
                history.back();
            },
            search_page: function (page) {
                $scope.query.page = page;
                methods.search('page', $scope.query.page);
            },
        }

        angular.extend($scope, methods);
        methods.search();
    });
});
